.class Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;
.super Landroid/widget/BaseAdapter;
.source "AndroidListUI.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lorg/microemu/android/device/ui/AndroidListUI;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "AndroidListAdapter"
.end annotation


# instance fields
.field objects:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Ljava/lang/String;",
            ">;"
        }
    .end annotation
.end field

.field final synthetic this$0:Lorg/microemu/android/device/ui/AndroidListUI;


# direct methods
.method private constructor <init>(Lorg/microemu/android/device/ui/AndroidListUI;)V
    .locals 1
    .parameter

    .prologue
    .line 87
    iput-object p1, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->this$0:Lorg/microemu/android/device/ui/AndroidListUI;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 89
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->objects:Ljava/util/ArrayList;

    return-void
.end method

.method synthetic constructor <init>(Lorg/microemu/android/device/ui/AndroidListUI;Lorg/microemu/android/device/ui/AndroidListUI$1;)V
    .locals 0
    .parameter "x0"
    .parameter "x1"

    .prologue
    .line 87
    invoke-direct {p0, p1}, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;-><init>(Lorg/microemu/android/device/ui/AndroidListUI;)V

    return-void
.end method


# virtual methods
.method public append(Ljava/lang/String;)I
    .locals 1
    .parameter "stringPart"

    .prologue
    .line 92
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->objects:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 93
    invoke-virtual {p0}, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->notifyDataSetChanged()V

    .line 95
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->objects:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->lastIndexOf(Ljava/lang/Object;)I

    move-result v0

    return v0
.end method

.method public getCount()I
    .locals 1

    .prologue
    .line 99
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->objects:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .parameter "position"

    .prologue
    .line 103
    iget-object v0, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->objects:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .parameter "position"

    .prologue
    .line 107
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 6
    .parameter "position"
    .parameter "convertView"
    .parameter "parent"

    .prologue
    .line 111
    if-nez p2, :cond_0

    .line 112
    new-instance p2, Landroid/widget/TextView;

    .end local p2
    iget-object v2, p0, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->this$0:Lorg/microemu/android/device/ui/AndroidListUI;

    iget-object v2, v2, Lorg/microemu/android/device/ui/AndroidListUI;->activity:Lorg/microemu/android/MicroEmulatorActivity;

    invoke-direct {p2, v2}, Landroid/widget/TextView;-><init>(Landroid/content/Context;)V

    .line 113
    .restart local p2
    invoke-virtual {p2}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v2

    sget-object v3, Landroid/R$styleable;->Theme:[I

    invoke-virtual {v2, v3}, Landroid/content/Context;->obtainStyledAttributes([I)Landroid/content/res/TypedArray;

    move-result-object v1

    .line 114
    .local v1, a:Landroid/content/res/TypedArray;
    move-object v0, p2

    check-cast v0, Landroid/widget/TextView;

    move-object v2, v0

    invoke-virtual {p2}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v3

    const/16 v4, 0x10

    const/4 v5, -0x1

    invoke-virtual {v1, v4, v5}, Landroid/content/res/TypedArray;->getResourceId(II)I

    move-result v4

    invoke-virtual {v2, v3, v4}, Landroid/widget/TextView;->setTextAppearance(Landroid/content/Context;I)V

    .line 117
    .end local v1           #a:Landroid/content/res/TypedArray;
    :cond_0
    move-object v0, p2

    check-cast v0, Landroid/widget/TextView;

    move-object v2, v0

    invoke-virtual {p0, p1}, Lorg/microemu/android/device/ui/AndroidListUI$AndroidListAdapter;->getItem(I)Ljava/lang/Object;

    move-result-object p0

    .end local p0
    check-cast p0, Ljava/lang/String;

    invoke-virtual {v2, p0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 119
    return-object p2
.end method
